// Simple MVC 
// Model describes an entity in the database 
// Controller describes how it relates to the database
// View describes the entity to the user

//Class for a target controller (target below)

	// desc
	// date
	// created
	// created by
	// deadline

var TargetControl = new Class({

/* Inherit the default controller functions. */
	Extends: baseControl,
    
/* Construct a new target controller. */
	initialize: function()
		{			
			this.parent();
			this.stringType = 'TargetController';
			this.itemType = 'Target';
			
		},

/* Add a new target to the controller. Only objects at this point. */
	add: function(data, callback)
		{
			//In the child class you only need to assign specifics to the items,
			//and then pass it to the parent class for construction (it handles the instance creation too).
			
			data.createdDate = ''+new Date();
			data.createdBy = 'fuzzy';		
			
			return this.baseAdd(data, callback);
		}
		
});